<?php
/**
  * @copyright: veapon 2011
  * @file: common.inc.php
  * @abstract: Common include file
  * @author: veapon
  * @create: 2011-11-11
  * @version: 1.0
  * @update:
  */
error_reporting(7);
date_default_timezone_set('PRC');

// 程序版本
define('APP_VERSION','1.0');

// 路径/url相关常量 
define('__ROOT__',str_replace('\\','/',dirname(__FILE__)).'/');
define('__URL__',str_replace(str_replace('\\','/',$_SERVER['DOCUMENT_ROOT']), 'http://'.$_SERVER['HTTP_HOST'] ,__ROOT__));
define('__VAR__',__ROOT__.'var/');
define('VAR_URL',__URL__.'var/');
define('__UPLOAD__',__VAR__.'uploads/');
define('UPLOAD_URL',VAR_URL.'uploads/');
define('__LIB__',__ROOT__.'lib/');
define('__SCHEMA__',__LIB__.'schemas/');
define('__VIEW__',__LIB__.'views/');
define('__MODEL__',__LIB__.'models/');
define('__PLUGIN__',__ROOT__.'plugins/');
// 引入文件
include_once(__ROOT__.'config.php');
require_once(__LIB__.'DB.class.php');
require_once(__LIB__.'Model.class.php');
//require_once(__LIB__.'Router.class.php');
//require_once(__LIB__.'Session.class.php');
session_start();
require_once(__LIB__.'Tpl.class.php');
require_once(__LIB__.'common.func.php');
